#The target is libBWE.so examples and plugins.

TARGET = libBWE.so

OUT_DIR = ../out/
OBJ_DIR = obj/
DEP_DIR = dep/
INC_DIR = ../../include/
SRC_DIR = ../../source/
EXP_DIR = ../../example/

GPATH = ./object
VPATH = ../../source
CPPFLAGS = -g -fPIC -I$(INC_DIR) -I/usr/include/freetype2

OBJECTS_CORE = \
	BBase.o\
	BApplication.o\
	BAudio.o\
	BAudioInput.o\
	BAudioOutput.o\
	BSystem.o\
	BFont.o\
	BGlyph.o\
	BOpenGL.o\
	BCursor.o\
	BDisk.o\
	BEntry.o\
	BFile.o\
	BStream.o\
	BBuffer.o\
	BFolder.o\
	BIcon.o\
	BImage.o\
	BPixmap.o\
	BLibrary.o\
	BPhysics.o\
	BObject.o\
	BThread.o\
	BClass.o\
	BScript.o\
	BSource.o\
	BSerialPort.o\
	BSocket.o\
	BRawSocket.o\
	BReadWrite.o\
	BTcpServer.o\
	BTcpSocket.o\
	BUdpSocket.o\
	BStyle.o\
	BStyleDocument.o\
	BXmlNode.o\
	BXmlDocument.o\
	BSonNode.o\
	BSonDocument.o\
	member_BAudio.o\
	member_BAudioInput.o\
	member_BAudioOutput.o\
	member_BBuffer.o\
	member_BEntry.o\
	member_BObject.o\
	member_BImage.o\
	member_BPixmap.o\
	member_BDisk.o\
	member_BCursor.o\
	member_BFile.o\
	member_BFolder.o\
	member_BLibrary.o\
	member_BPhysics.o\
	member_BFont.o\
	member_BIcon.o\
	member_BThread.o\
	member_BSerialPort.o\
	member_BClass.o\
	member_BScript.o\
	member_BSource.o\
	member_BSocket.o\
	member_BRawSocket.o\
	member_BTcpServer.o\
	member_BTcpSocket.o\
	member_BUdpSocket.o\
	member_BStyle.o\
	member_BStyleDocument.o\
	member_BXmlNode.o\
	member_BXmlDocument.o\
	member_BSonNode.o\
	member_BSonDocument.o\

OBJECTS_GUI = \
	BScreen.o\
	BPainter.o\
	BWidget.o\
	BSpacer.o\
	BSpring.o\
	BViewer.o\
	BButton.o\
	BEvent.o\
	BMenu.o\
	BMenuBar.o\
	BDrag.o\
	BAction.o\
	BActionGroup.o\
	BDialog.o\
	BFileDialog.o\
	BColorDialog.o\
	BMessageBox.o\
	BMainWindow.o\
	BMouseEvent.o\
	BKeyEvent.o\
	BCharEvent.o\
	BDragEvent.o\
	BComboBox.o\
	BComboItem.o\
	BCheckBox.o\
	BRadioBox.o\
	BLineEdit.o\
	BDateEdit.o\
	BSlider.o\
	BFloatSlider.o\
	BRealSlider.o\
	BSpinBox.o\
	BLongSpinBox.o\
	BFloatSpinBox.o\
	BDoubleSpinBox.o\
	BRealSpinBox.o\
	BButtonGroup.o\
	BLabel.o\
	BScrollArea.o\
	BScrollBar.o\
	BScrollWidget.o\
	BTabWidget.o\
	BProgressBar.o\
	BTreeWidget.o\
	BTreeItem.o\
	BListWidget.o\
	BListItem.o\
	BTableWidget.o\
	BTableItem.o\
	BTextEdit.o\
	BTextFormat.o\
	BTimeEdit.o\
	BGroupBox.o\
	BHtmlItem.o\
	BHtmlWidget.o\
	BLayout.o\
	BHBoxLayout.o\
	BVBoxLayout.o\
	BDockLayout.o\
	BGridLayout.o\
	BStackLayout.o\
	member_BAction.o\
	member_BActionGroup.o\
	member_BMenu.o\
	member_BButtonGroup.o\
	member_BSlider.o\
	member_BFloatSlider.o\
	member_BRealSlider.o\
	member_BSpinBox.o\
	member_BLongSpinBox.o\
	member_BFloatSpinBox.o\
	member_BDoubleSpinBox.o\
	member_BRealSpinBox.o\
	member_BTabWidget.o\
	member_BScrollWidget.o\
	member_BMenuBar.o\
	member_BTableWidget.o\
	member_BTableItem.o\
	member_BDialog.o\
	member_BFileDialog.o\
	member_BColorDialog.o\
	member_BMessageBox.o\
	member_BTreeWidget.o\
	member_BTreeItem.o\
	member_BListWidget.o\
	member_BListItem.o\
	member_BComboBox.o\
	member_BComboItem.o\
	member_BLabel.o\
	member_BScrollArea.o\
	member_BScrollBar.o\
	member_BScreen.o\
	member_BLineEdit.o\
	member_BTextEdit.o\
	member_BTextFormat.o\
	member_BTimeEdit.o\
	member_BDateEdit.o\
	member_BEvent.o\
	member_BPainter.o\
	member_BButton.o\
	member_BViewer.o\
	member_BSpacer.o\
	member_BSpring.o\
	member_BWidget.o\
	member_BGroupBox.o\
	member_BHtmlItem.o\
	member_BHtmlWidget.o\
	member_BLayout.o\
	member_BHBoxLayout.o\
	member_BVBoxLayout.o\
	member_BDockLayout.o\
	member_BGridLayout.o\
	member_BStackLayout.o\
	member_BProgressBar.o\
	member_BDrag.o\
	member_BMainWindow.o\

OBJECTS_3D = \
	BRender.o\
	BScene.o\
	BGroup.o\
	BNode.o\
	BLight.o\
	BCamera.o\
	BFog.o\
	BHandler.o\
	BSphereHandler.o\
	BStrollHandler.o\
	BOrthoHandler.o\
	BMaterial.o\
	BTexture.o\
	BProgram.o\
	BUniform.o\
	BShader.o\
	BShape.o\
	BMesh.o\
	BGeometry.o\
	BCube.o\
	BCone.o\
	BSphere.o\
	BGeoSphere.o\
	BCylinder.o\
	BCapsule.o\
	BTorus.o\
	BTube.o\
	BBillboard.o\
	BTextual.o\
	BParticle.o\
	BTerrain.o\
	BElement.o\
	BSurface.o\
	BPicker.o\
	BPickItem.o\
	BConstraint.o\
	BPointConstraint.o\
	BSliderConstraint.o\
	BHingeConstraint.o\
	BConearConstraint.o\
	BSixdofConstraint.o\
	member_BRender.o\
	member_BScene.o\
	member_BGroup.o\
	member_BNode.o\
	member_BLight.o\
	member_BCamera.o\
	member_BFog.o\
	member_BHandler.o\
	member_BSphereHandler.o\
	member_BStrollHandler.o\
	member_BOrthoHandler.o\
	member_BMaterial.o\
	member_BTexture.o\
	member_BProgram.o\
	member_BShader.o\
	member_BUniform.o\
	member_BShape.o\
	member_BMesh.o\
	member_BGeometry.o\
	member_BElement.o\
	member_BCone.o\
	member_BCylinder.o\
	member_BCube.o\
	member_BCapsule.o\
	member_BTorus.o\
	member_BTube.o\
	member_BSphere.o\
	member_BGeoSphere.o\
	member_BSurface.o\
	member_BBillboard.o\
	member_BTextual.o\
	member_BParticle.o\
	member_BTerrain.o\
	member_BPicker.o\
	member_BPickItem.o\
	member_BConstraint.o\
	member_BPointConstraint.o\
	member_BSliderConstraint.o\
	member_BHingeConstraint.o\
	member_BConearConstraint.o\
	member_BSixdofConstraint.o\

	
OBJECTS_INTERNAL = \
	IWindow.o\
	IFontFamily.o\
	ILineBlock.o\
	ITextBlock.o\
	IGlobal.o\
	ISockets.o\
	IHeader.o\
	IComboBoard.o\
	IGLState.o\
	IRound.o\
	ITabBoard.o\
	IWindow_X11.o\
	IWindow_Win.o\
	IMetaTypes.o\
	ILibStdio.o\
	ILibMath.o\
	IAlignment.o\

OBJECTS = $(OBJECTS_CORE) $(OBJECTS_GUI) $(OBJECTS_3D) $(OBJECTS_INTERNAL)

.PHONY:all
all:
	mkdir -p ./obj
	cd obj; make -f ../BWE.mk $(OUT_DIR)$(TARGET)

$(OUT_DIR)$(TARGET):$(OBJECTS)
	g++ -o $@ -fPIC -shared $(OBJECTS) -g -pthread -lGL -lX11 -lrt -lfreetype

.PHONY:clean
clean:
	cd obj;rm -f *.o;
	cd out;rm -f $(TARGET)
	
	
	
